package org.al.poc.generator;

import org.al.poc.generator.gui.GeneratorguiView;

public class LogManager {
	
	private static GeneratorguiView view;
	private static long nbConn = 0;
	private static long nbOrderSent = 0;
	private static long nbOrderReceived = 0;
	
	
	
	
	public static GeneratorguiView getView() {
		return view;
	}

	public static void setView(GeneratorguiView view) {
		LogManager.view = view;
	}

	

	public static synchronized void logConnection() {
		view.nbConnLabel.setText("" + (++nbConn));
	}

	
	public static synchronized void logOrderSent() {
		view.nbOrderSentLabel.setText("" + (++nbOrderSent));
	}
	
	public static synchronized void logOrderReceived() {
		view.nbOrderReceivedLabel.setText("" + (++nbOrderReceived));
	}
	
	
}
